#!/bin/sh
case "$1" in
  start)
    (
      if is-tv-box; then
        /app/client/rundialserver
      fi
    ) &
    ;;
  stop)
    pkillwait -x rundialserver
    pkillwait -x dialserver
    ;;
  restart)
    $0 stop; $0 start
    ;;
  *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
esac
